<%@ include file="/WEB-INF/jsp/taglib.jsp" %>

<jsp:useBean id="actionBean" scope="request" type="com.rupertjones.globalcron.web.InfoUsersAction" />

<s:layout-render name="/WEB-INF/jsp/layout.jsp" title="Global Cron" subtitle="Hosts">
        <s:layout-component name="body">
        <h1>Users</h1>
        <sec:authorize access="hasRole('ROLE_ADMIN')">
        <div style="text-align: right; border:1px; width:100%; padding-bottom:10px;">
        <a title="Add User" href="AddUser.action"><img src="resources/add_user.png" border="0"/></a>
        </div>
        </sec:authorize>
        <display:table name="actionBean.users" id="user" requestURI="InfoUsers.action" class="rounded-corner">
            <display:column title="User name" property="username"/>
            <display:column title="Full Name" property="fullName"/>
            <display:column title="Last Login" property="lastLogin"/>
            <display:column title="Roles" property="printRoles"/>
            <display:column title="">
                <sec:authorize access="hasRole('ROLE_ADMIN')">
                    <a href="EditUser.action?user.id=${user.id}"><img style="padding-right:10px;" align="right" src="resources/edit.gif" border="0"></a>
                </sec:authorize>
            </display:column>
        </display:table>
    </s:layout-component>
</s:layout-render>
